#pragma once
#include "Enemy.h"
#include "Boss.h"

//#include "../SGD Wrappers/SGD_Handle.h"

class Dragon :
	public Boss
{
public:
	Dragon();
	virtual ~Dragon();

	enum AttackStrategy { GROUND, FLYING, MELEE };
	AttackStrategy currAttackStrat = GROUND;

	/**********************************************************/
	// Interface:
	//	- virtual functions for children classes to override
	virtual void	Update(float elapsedTime)		override;
	virtual void	Render(void)					override;

	//	virtual SGD::Rectangle GetRect(void)	const			override;
	virtual int		GetType(void)	const			override	{ return OBJ_ENEMY; }
	virtual void	HandleCollision(GameObject* pOther)	override;
	virtual void	HandleEvent(const SGD::Event* pEvent) override;
	virtual int		GetEnemyType()	const { return ENEMY_BOSS; }

	virtual bool DoAttack();
	virtual void Attack();

	virtual void MoveLeft(float speed = 100.0f);
	virtual void MoveRight(float speed = 100.0f);
	void MoveTowardsPlayer();

	virtual void EnterIdle();
	virtual void EnterCloseIn();
	virtual void EnterDead();
	void EnterFlying();
	void EnterLand();

	SGD::Vector GetDistanceToPlayer(void) const { return m_vDistanceToPlayer; }
	void SetDistanceToPlayer(SGD::Vector dist) { m_vDistanceToPlayer = dist; }
	SGD::Vector aiming = { 0, 0 };

private:
	SGD::Vector	m_vDistanceToPlayer = SGD::Vector{ 0, 0 };
	float takeOffTimer = 10.0f;
	float flightTime = 0.0f;
	float fireballTimer = 0.0f;
	float moveTimer = 0.0f;
};

